package huoye.shops.huoye.mine.activity;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.codeideology.android.lang.entity.Paging;
import com.codeideology.android.widget.recycler.RecyclerViewAdapter;

import huoye.shops.R;
import huoye.shops.base.PullToRefreshActivity;
import huoye.shops.huoye.mine.adapter.RecordPayAdapter;
import huoye.shops.huoye.mine.model.PostDepositRec;
import huoye.shops.huoye.mine.presenter.RecordPayPresenter;
import huoye.shops.huoye.mine.view.IRecordPayRefreshView;
import huoye.shops.huoye.user.model.User;

public class RecordPayActivity extends PullToRefreshActivity<PostDepositRec> implements IRecordPayRefreshView {


    private RecordPayPresenter mRecordPayPresenter;
    private RecordPayAdapter adapter;

    @Override
    public RecyclerViewAdapter createAdapter() {
        adapter = new RecordPayAdapter(this);
        return adapter;
    }

    @Override
    public void onItemClick(PostDepositRec postDepositRec, int i, View view) {

    }


    @Override
    protected void initView(@Nullable Bundle bundle) {
        super.initView(bundle);
        setTitle("收支记录");
        mRecordPayPresenter = new RecordPayPresenter();
        mRecordPayPresenter.addTaskListener(this);
        mRecordPayPresenter.onStart();
        query();
    }


    @Override
    public void query(Paging paging) {
        super.query(paging);
        mRecordPayPresenter.getRecordPost(paging);
    }


}
